package com.mzy.datepackage.M2022.Apr.fourteen;

import java.io.File;
import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author mzy
 * @Date 2022/4/18 14:33
 * @Version 1.0
 */
public class test2 {
    public static void main(String[] args) {
        File file = new File("d://sss/s/d.txt");


        String fileNameTwo = file.getAbsolutePath();
        String substring = fileNameTwo.substring(0, fileNameTwo.lastIndexOf("."));
        String substring1 = fileNameTwo.substring(fileNameTwo.lastIndexOf("."));
        System.out.println(substring);
        System.out.println(substring1);
        Random r = new Random();
        int num1 = r.nextInt(10)+1;
        System.out.println(num1);
    }
}
